let net = require('net')

let server = net.createServer(function(socket) {
  socket.on('data', function(data) {
    socket.write('你好呀')
  })

  socket.on('end', function() {
    console.log('连接结束')
  })

  socket.write('欢迎光临')
})

server.listen(8214, function() {
  console.log('server is listen port: 8214')
})